{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 聚类\n",
    "\n",
    "熟悉各中聚类算法的调用\n",
    "并用评价指标选择合适的超参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入必要的工具包\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.cluster import MiniBatchKMeans\n",
    "\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn import metrics\n",
    "\n",
    "from sklearn.decomposition import PCA\n",
    "import time\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#读取训练数据\n",
    "train = pd.read_csv('./UsedEvents.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>c_1</th>\n",
       "      <th>c_2</th>\n",
       "      <th>c_3</th>\n",
       "      <th>c_4</th>\n",
       "      <th>c_5</th>\n",
       "      <th>c_6</th>\n",
       "      <th>c_7</th>\n",
       "      <th>c_8</th>\n",
       "      <th>c_9</th>\n",
       "      <th>c_10</th>\n",
       "      <th>...</th>\n",
       "      <th>c_92</th>\n",
       "      <th>c_93</th>\n",
       "      <th>c_94</th>\n",
       "      <th>c_95</th>\n",
       "      <th>c_96</th>\n",
       "      <th>c_97</th>\n",
       "      <th>c_98</th>\n",
       "      <th>c_99</th>\n",
       "      <th>c_100</th>\n",
       "      <th>c_other</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>33</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 101 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   c_1  c_2  c_3  c_4  c_5  c_6  c_7  c_8  c_9  c_10   ...     c_92  c_93  \\\n",
       "0    2    0    2    0    0    0    0    0    0     0   ...        0     1   \n",
       "1    2    0    2    0    0    0    0    0    0     0   ...        0     0   \n",
       "2    0    0    0    0    0    0    0    0    0     0   ...        0     0   \n",
       "3    1    0    2    1    0    0    0    0    0     0   ...        0     0   \n",
       "4    1    1    0    0    0    0    0    2    0     0   ...        0     0   \n",
       "5    0    0    0    0    0    0    0    0    0     0   ...        0     0   \n",
       "6    0    0    0    1    0    0    0    0    0     0   ...        0     0   \n",
       "7    0    0    2    0    0   33    0    3    1     0   ...        2     0   \n",
       "8    0    0    0    0    0    0    0    0    0     0   ...        0     0   \n",
       "9    1    0    1    0    1    0    0    0    0     0   ...        0     0   \n",
       "\n",
       "   c_94  c_95  c_96  c_97  c_98  c_99  c_100  c_other  \n",
       "0     0     0     0     0     0     0      0        9  \n",
       "1     0     0     0     0     0     0      0        7  \n",
       "2     0     0     0     0     0     0      0       12  \n",
       "3     0     0     0     0     0     0      0        8  \n",
       "4     0     0     0     0     0     0      0        9  \n",
       "5     0     0     0     0     0     0      0       22  \n",
       "6     0     0     0     0     0     0      0       28  \n",
       "7     0     0     0     0     0     0      0      354  \n",
       "8     0     0     0     0     0     1      0       25  \n",
       "9     0     0     0     0     0     0      0        3  \n",
       "\n",
       "[10 rows x 101 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "DropCol=['event_id','user_id','start_time','city','state','zip','country','lat','lng']\n",
    "X_train=train.drop(DropCol,axis=1)\n",
    "X_train.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train_1=X_train.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "the shape of train_image: (13418, 101)\n"
     ]
    }
   ],
   "source": [
    "# 原始输入的特征维数和样本数目\n",
    "print('the shape of train_image: {}'.format(X_train.shape))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ice2018/anaconda2/lib/python2.7/site-packages/sklearn/utils/validation.py:475: DataConversionWarning: Data with input dtype int64 was converted to float64 by StandardScaler.\n",
      "  warnings.warn(msg, DataConversionWarning)\n"
     ]
    }
   ],
   "source": [
    "from sklearn.preprocessing import StandardScaler\n",
    "ss_X = StandardScaler()\n",
    "X_train = ss_X.fit_transform(X_train_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 一个参数点（聚类数据为K）的模型，在校验集上评价聚类算法性能\n",
    "def K_cluster_analysis_MiniBatch(K, X_train):\n",
    "    start = time.time()\n",
    "    \n",
    "    print(\"K-means MiniBatch begin with clusters: {}\".format(K));\n",
    "    \n",
    "    #K-means,在训练集上训练\n",
    "    mb_kmeans = MiniBatchKMeans(n_clusters = K)\n",
    "    mb_kmeans.fit(X_train)\n",
    "    \n",
    "    # 在训练集上测试\n",
    "    y_train_pred = mb_kmeans.predict(X_train)\n",
    "    \n",
    "\n",
    "    # K值的评估标准\n",
    "    #常见的方法有轮廓系数Silhouette Coefficient和Calinski-Harabasz Index\n",
    "    #这两个分数值越大则聚类效果越好\n",
    "    CH_score = metrics.calinski_harabaz_score(X_train,y_train_pred)\n",
    "    SI_score = metrics.silhouette_score(X_train,y_train_pred)\n",
    "    \n",
    "    end = time.time()\n",
    "    print(\"CH_score: {}, time elaps:{}\".format(CH_score, int(end-start)))\n",
    "    print(\"SI_score: {}\".format(SI_score))\n",
    "    \n",
    "    return CH_score,SI_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means MiniBatch begin with clusters: 10\n",
      "CH_score: 302.053262265, time elaps:4\n",
      "SI_score: 0.0365543425233\n",
      "K-means MiniBatch begin with clusters: 20\n",
      "CH_score: 195.640085272, time elaps:3\n",
      "SI_score: -0.0480392149072\n",
      "K-means MiniBatch begin with clusters: 30\n",
      "CH_score: 132.84352124, time elaps:3\n",
      "SI_score: -0.136509190269\n",
      "K-means MiniBatch begin with clusters: 40\n",
      "CH_score: 108.794343533, time elaps:3\n",
      "SI_score: -0.10664323163\n",
      "K-means MiniBatch begin with clusters: 50\n",
      "CH_score: 82.295153707, time elaps:3\n",
      "SI_score: -0.0903374357188\n",
      "K-means MiniBatch begin with clusters: 60\n",
      "CH_score: 119.083668491, time elaps:4\n",
      "SI_score: -0.0827611711636\n",
      "K-means MiniBatch begin with clusters: 70\n",
      "CH_score: 70.3535848398, time elaps:4\n",
      "SI_score: -0.0673038084136\n",
      "K-means MiniBatch begin with clusters: 80\n",
      "CH_score: 60.1811042249, time elaps:4\n",
      "SI_score: -0.176554412391\n",
      "K-means MiniBatch begin with clusters: 90\n",
      "CH_score: 62.3520858815, time elaps:4\n",
      "SI_score: -0.149930774574\n",
      "K-means MiniBatch begin with clusters: 100\n",
      "CH_score: 61.5909858349, time elaps:4\n",
      "SI_score: -0.125587069665\n"
     ]
    }
   ],
   "source": [
    "# 设置超参数（聚类数目K）搜索范围\n",
    "Ks_Mini = [10,20, 30,40,50,60,70,80,90,100]\n",
    "CH_scores_Mini = []\n",
    "SI_scores_Mini = []\n",
    "for K in Ks_Mini:\n",
    "    ch,si = K_cluster_analysis_MiniBatch(K, X_train)\n",
    "    CH_scores_Mini.append(ch)\n",
    "    SI_scores_Mini.append(si)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f199778b390>]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAHKJJREFUeJzt3XuUFOWZx/Hvw11UIujIkgEFDSpqFHFUFDeoQEC8gLtRMUEJF8mqMQQ0BE1ixCSbRKOoMRoRVFy8Ea/EdYmImhgvmEHlLgJGZQRhUASUKLdn/3hrDgMOTDPdPdVd9fuc02e6q2t6Hvo0v6l56633MXdHRESSq0HcBYiISH4p6EVEEk5BLyKScAp6EZGEU9CLiCScgl5EJOEU9CIiCaegFxFJOAW9iEjCNYq7AID99tvP27dvH3cZIiJFZdasWavdvaS2/Qoi6Nu3b095eXncZYiIFBUzey+T/TR0IyKScAp6EZGEU9CLiCScgl5EJOEU9CIiCaegFxFJuFqD3syamdlrZjbbzOab2dhoewczm2lmi83sYTNrEm1vGj1eEj3fPr//BBER2ZVMjui/AE5z96OBzkAfM+sK/BYY5+4dgTXA0Gj/ocAad/8aMC7aLy/eegtGjoSNG/P1E0REil+tQe/Bp9HDxtHNgdOAR6Ltk4D+0f1+0WOi53uYmeWs4m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6f18wM4/C1W/FKvk7H1R0GfBzPYCHgV+6O7r4q4nDmZ2JrDK3WdV31zDrmmZ3tUI6ALc4e7HAJ+RkmGamkTjz/2ADsBXgT0JQxQ7SsvnY1fy9v9GQV9HZtaYEPL3u/tj0eaV0fo+ZLrOTwJ0A86OmtA8RBi+uRnYx8yqLshrCyyPp7x6VwFUuPvM6PEjhOBP42cDoCfwT3evdPdNwGPASaT38wE7/yxUAO2q7Zez90VBXwcW1n2YCCx095uqPTUVGBTdH0QYu080d7/K3du6e3vCSbbn3P07wPPAt6LdUvFeALj7h8AyMzs02tQDWEAKPxuR94GuZtY8+n9T9X6k8vMR2dlnYSpwUTT7piuwtmqIJ1u6YKoOzOxk4EVgLtvGpa8mjNNPAQ4gWufH3T+OpcgYmNkpwJXufqaZHUQ4wm8FvAEMdPcv4qyvvphZZ2AC0AR4BxhMOKhK5WfDzMYC5xNmq70BDCOMPSf+82FmDwKnEFaoXAn8HHiCGj4L0S/C2wizdDYAg929PCd1KOhFRJJNQzciIgmnoBcRSTgFvYhIwinoRUQSTkEvIpJwCnoRkYRT0IuIJJyCXkQk4f4fCE8e89LfIY4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks_Mini, np.array(CH_scores_Mini), 'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f199772c110>]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD8CAYAAABzTgP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zL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nstNYu97yeTmZRBOP6cTew1Vp7wFp7HvgEuJXgXTeyXGxd2AlUyzZdvn03KoYC5hk/HwNssNa+k+1XnwFdPD93AT71djYnWGtfstZWtdZWJ3PH4lfW2seBxcBjnsmC6fvYC+wwxtTxvNUcSCU414/twM3GmBKev5us7yIo141sLrYufAZ09hyddDNwNGvIKa90glsBM8bcDnwLrOX3MfW/krmfYSpwHZl/EAnW2j/udApoxpimwPPW2geNMTXJ3IIIBVYBT1hrzzqZz1uMMQ3I3BFfFNgCPEnmP9qCbv0wxrwGtCPzaL5VQHcyx82DYt0wxnwMNCXzKqr7gP7ALHJZFzzlOYTMo5hOAU9aa935kkPFICIi2WkoSUREclAxiIhIDioGERHJQcUgIiI5qBhERCQHFYOIiOSgYhARkRxUDCIiksP/B+7HhQBjv0BTAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks_Mini, np.array(SI_scores_Mini), 'g-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这里发现每次运行得到的最优K都不一样，在计算资源允许的情况下运行KMeans，这里还是找找最优的参数在那里。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.cluster import KMeans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 一个参数点（聚类数据为K）的模型，在校验集上评价聚类算法性能\n",
    "def K_cluster_analysis_KMeans(K, X_train):\n",
    "    start = time.time()\n",
    "    \n",
    "    print(\"K-means begin with clusters: {}\".format(K));\n",
    "    \n",
    "    #K-means,在训练集上训练\n",
    "#    mb_kmeans = MiniBatchKMeans(n_clusters = K)\n",
    "#    mb_kmeans.fit(X_train)\n",
    "    kmeans = KMeans(n_clusters = K)\n",
    "    kmeans.fit(X_train)    \n",
    "    # 在训练集上测试\n",
    "    y_train_pred = kmeans.predict(X_train)\n",
    "    \n",
    "\n",
    "    # K值的评估标准\n",
    "    #常见的方法有轮廓系数Silhouette Coefficient和Calinski-Harabasz Index\n",
    "    #这两个分数值越大则聚类效果越好\n",
    "    CH_score = metrics.calinski_harabaz_score(X_train,y_train_pred)\n",
    "    SI_score = metrics.silhouette_score(X_train,y_train_pred)\n",
    "    \n",
    "    end = time.time()\n",
    "    print(\"CH_score: {}, time elaps:{}\".format(CH_score, int(end-start)))\n",
    "    print(\"SI_score: {}\".format(SI_score))\n",
    "    \n",
    "    return CH_score,SI_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters: 10\n",
      "CH_score: 582.444385188, time elaps:6\n",
      "SI_score: 0.190276320282\n",
      "K-means begin with clusters: 20\n",
      "CH_score: 359.305958757, time elaps:6\n",
      "SI_score: 0.184043207765\n",
      "K-means begin with clusters: 30\n",
      "CH_score: 266.029578812, time elaps:8\n",
      "SI_score: 0.167627271363\n",
      "K-means begin with clusters: 40\n",
      "CH_score: 225.637834154, time elaps:8\n",
      "SI_score: 0.136662595889\n",
      "K-means begin with clusters: 50\n",
      "CH_score: 190.305047476, time elaps:9\n",
      "SI_score: 0.110362062732\n",
      "K-means begin with clusters: 60\n",
      "CH_score: 171.488828176, time elaps:9\n",
      "SI_score: 0.142550281421\n",
      "K-means begin with clusters: 70\n",
      "CH_score: 154.301578608, time elaps:10\n",
      "SI_score: 0.139025574861\n",
      "K-means begin with clusters: 80\n",
      "CH_score: 142.737363575, time elaps:10\n",
      "SI_score: 0.106408067639\n",
      "K-means begin with clusters: 90\n",
      "CH_score: 130.615192178, time elaps:11\n",
      "SI_score: 0.110713614053\n",
      "K-means begin with clusters: 100\n",
      "CH_score: 124.260056031, time elaps:13\n",
      "SI_score: 0.0657917155037\n"
     ]
    }
   ],
   "source": [
    "# 设置超参数（聚类数目K）搜索范围\n",
    "#Ks = [10,20, 30,40,50,60,70,80,90,100]\n",
    "Ks = [10,20, 30,40,50,60,70,80,90,100]\n",
    "CH_scores = []\n",
    "SI_scores = []\n",
    "for K in Ks:\n",
    "    ch,si = K_cluster_analysis_KMeans(K, X_train)\n",
    "    CH_scores.append(ch)\n",
    "    SI_scores.append(si)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f19976967d0>]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAHMFJREFUeJzt3XmUVPWZ//H3Q7MJImvLtDQCRmgwRgU6Ci5ERfNzISxBBFqPxEPCmcSjJtFJNJ6ZzJjfzJjML2LMnHFixIS4sbmAypgwBEUNot0QBGUNgrSgtCKooKzP74/vrdPV0NBFb7fq1ud1Tp2qe+t281Sd4lO3n/u932vujoiIJFeLuAsQEZGmpaAXEUk4Bb2ISMIp6EVEEk5BLyKScAp6EZGEU9CLiCScgl5EJOEyCnoz62Rmc8xsjZmtNrOhZtbFzBaY2frovnO0rZnZ/Wa2wczeNLNBTfsSRETkWCyTM2PNbDrwsrs/ZGatgXbAT4Ad7n6Pmd0BdHb3H5vZVcDNwFXAecCv3P28Y/3+bt26ee/evRv4UkRE8ktFRcWH7l5Y13Z1Br2ZnQSsAE7ztI3NbC1wsbtvM7Mi4EV3LzGz30SPnzh8u6P9G6WlpV5eXp7RCxMRkcDMKty9tK7tMmndnAZUAb8zs+Vm9pCZtQe6p8I7uj852r4HsC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HQN4CZnQg8CXzf3T+Ju544mNkIYLu7V6SvrmXTfBne1RIYBDzg7gOB3eRBm6Y2Ue95FNAHOAVoT2hPHC5fPht1abL/Nwr6ejKzVoSQf8zdn4pWf2BmRdHzRcD2uOprRhcAI81sEzCD0L65D+hkZqmLzxcDW+Mpr9lVApXuvjRankMI/nz8bFwGvOPuVe6+H3gKOJ/8/WykHO2zUAn0TNuu0d4bBX09mJkB04DV7n5v2lPzgEnR40mE3n2iufud7l7s7r0JB9r+7O7XAYuAa6LN8uK9AHD394EtZlYSrRoOvE0efjYILZshZtYu+j+Tei/y8rOR5mifhXnADdHomyHArlSLp6F0wlQ9mNmFwMvASqr70j8h9OlnAacSPuTj3H1HLEXGwMwuBm539xFmdhphD78LsBy43t33xllfczGzc4CHgNbARuBGwk5V3n02zOxfgPGEkWrLgW8T+s558dkwsyeAiwkzVH4A/BR4hlo+C9GX4X8SRunsAW509/JGqUNBLyKSbGrdiIgknIJeRCThFPQiIgmnoBcRSTgFvYhIwinoRUQSTkEvIpJwCnoRkYT7/2MMYezgnHp4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH_scores), 'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f199767ff10>]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUe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I8dWY8Inz/nRnobIHmnBvlnKvqnKtJ6gm6+c65vwALSB2TCULkvQBwzu0GtpvZhb5JVwHrCMFtw2cb0NrMivr+vznzfoTk9pHGH20Ps4A7fd/iaQ0cPHMYKDt0cVY2mVk74DtgDf87jv0Yqcf1PwSqk7qx3+yc2+9JSA+YWUdgmHPuWjOrTeqefxlgBXC7c+6kl/kCxcwuBd4CwoEtQB9Sd7ZCctsws6eAW0n91tsKoD+px6lDYvsws/dJvYNgOeBX4ElgBhlsD74PxtdI/bbPMaCPcy422xlU+iIioUOHd0REQohKX0QkhKj0RURCiEpfRCSEqPRFREKISl9EJISo9EVEQohKX0QkhPw/JEqQzdCNNMAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(SI_scores), 'g-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters: 6\n",
      "CH_score: 875.986689138, time elaps:5\n",
      "SI_score: 0.254783557719\n",
      "K-means begin with clusters: 7\n",
      "CH_score: 771.70334841, time elaps:5\n",
      "SI_score: 0.255177912312\n",
      "K-means begin with clusters: 8\n",
      "CH_score: 702.213216771, time elaps:5\n",
      "SI_score: 0.196273325008\n",
      "K-means begin with clusters: 9\n",
      "CH_score: 640.821022322, time elaps:5\n",
      "SI_score: 0.215627412487\n",
      "K-means begin with clusters: 10\n",
      "CH_score: 587.085610299, time elaps:5\n",
      "SI_score: 0.23855536532\n",
      "K-means begin with clusters: 11\n",
      "CH_score: 544.979403169, time elaps:5\n",
      "SI_score: 0.186332496295\n",
      "K-means begin with clusters: 12\n",
      "CH_score: 516.912665585, time elaps:6\n",
      "SI_score: 0.216159788776\n",
      "K-means begin with clusters: 13\n",
      "CH_score: 482.229549101, time elaps:6\n",
      "SI_score: 0.19847746718\n",
      "K-means begin with clusters: 14\n",
      "CH_score: 445.604289936, time elaps:6\n",
      "SI_score: 0.184764862331\n",
      "K-means begin with clusters: 15\n",
      "CH_score: 448.629771659, time elaps:6\n",
      "SI_score: 0.193806477052\n"
     ]
    }
   ],
   "source": [
    "# 重新设置超参数（聚类数目K）搜索范围\n",
    "Ks_Min = [6,7, 8,9,10,11,12,13,14,15]\n",
    "CH_scores = []\n",
    "SI_scores = []\n",
    "for K in Ks_Min:\n",
    "    ch,si = K_cluster_analysis_KMeans(K, X_train)\n",
    "    CH_scores.append(ch)\n",
    "    SI_scores.append(si)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f19975f3e90>]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4VGX6//H3nU4IPQEyIRTp1QRmsESsgGABdHcVEAVlBdwfynfVdV0REQXdFXVd10KwIFgXWUVEUBABFUFJIIL0Ki1AQIiQENKe3x+ZsENIzAAzc6bcr+viInPmlDujfHLyPOfcR4wxKKWUCg1hVheglFLKdzT0lVIqhGjoK6VUCNHQV0qpEKKhr5RSIURDXymlQoiGvlJKhRANfaWUCiEa+kopFUIirC6govj4eNO8eXOry1BKqYCSmZl5yBiTUN16fhf6zZs3JyMjw+oylFIqoIjIz+6sp8M7SikVQjT0lVIqhGjoK6VUCNHQV0qpEKKhr5RSIURDXymlQoiGvlJKhRC/u07fHxhjKC4t5kTxCQqKCygoLuBEUdn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wgZekeuUkqFkGA601dKKVUNDX2llAohGvpKKRVCNPSVUiqEaOgrpVQI0dBXSqkQoqGvlFIhRENfKaVCyP8H3b3QEqSKXKQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks_Min, np.array(SI_scores), 'g-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f1997564d90>]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAG7BJREFUeJzt3XuczmX+x/HXZ8ixQujgUOO0OggxhQ4qotqKDhQhHW2riHZbx3ps24FOW1SrnCmUrB70KCL51dYWRqUDhbQYWVTrEPtbaa/fH9d3fjNymDFm7uu+v/f7+Xh43Pf9ne9Mn/lW775d1/W9PuacQ0RE4isjdAEiIlKyFPQiIjGnoBcRiTkFvYhIzCnoRURiTkEvIhJzCnoRkZhT0IuIxJyCXkQk5kqHLgCgWrVqLjMzM3QZIiIpZenSpd8556oXdF5SBH1mZibZ2dmhyxARSSlmtrYw52noRkQk5hT0IiIxp6AXEYk5Bb2ISMwp6EVEYk5BLyIScwp6EZGYS+mgX7ECBg0CdUMUETmwlA76OXNg+HAYNy50JSIiySulg75fP2jbFu66C1atCl2NiEhySumgz8iAiROhbFno3h1++il0RSIiySelgx6gVi14/nlYvBgeeCB0NSIiySflgx6gc2fo2RMeegjefz90NSIiySUWQQ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PSE55z5zzh3rnMt0zmXibxybRbkSOykb9JE+wBQz+xRoCjwcuJ4gov+rmQF8BHyG//uaNk/9AZjZNOADoKGZ5ZjZLcBwoJ2ZrcKvrBgessZEOsD1eAY4CphvZp+Y2XNBi0ygA1yPtKEnY0VEYi7V7+hFRKQACnoRkZhT0IuIxJyCXkQk5hT0IiIxp6AXEYk5Bb2ISMwp6EVEYu7/AEvSH8RH1qRXAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks_Min, np.array(CH_scores), 'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters: 2\n",
      "CH_score: 1477.69951334, time elaps:4\n",
      "SI_score: 0.519104290964\n",
      "K-means begin with clusters: 3\n",
      "CH_score: 1387.01408077, time elaps:5\n",
      "SI_score: 0.51615753574\n",
      "K-means begin with clusters: 4\n",
      "CH_score: 1177.72452958, time elaps:5\n",
      "SI_score: 0.342692492096\n",
      "K-means begin with clusters: 5\n",
      "CH_score: 1000.10820766, time elaps:5\n",
      "SI_score: 0.281383098366\n",
      "K-means begin with clusters: 6\n",
      "CH_score: 876.023314434, time elaps:5\n",
      "SI_score: 0.256821189814\n"
     ]
    }
   ],
   "source": [
    "# 重新设置超参数（聚类数目K）搜索范围\n",
    "Ks_Min = [2, 3,4,5,6]\n",
    "CH_scores = []\n",
    "SI_scores = []\n",
    "for K in Ks_Min:\n",
    "    ch,si = K_cluster_analysis_KMeans(K, X_train)\n",
    "    CH_scores.append(ch)\n",
    "    SI_scores.append(si)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f19974cce90>]"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xl8FHWe//HXJwenICjx4AyygCCDoIGBBWEERdQVHMVZHHXVWUUYmCBeIN6ojIICIrjers5PBxhHZ9AV8CQcCiYIiBBRUMAIakQO5Qohn98faZg2BtKBTqo7/X4+HnnYVfWt9Dsl/e6juqrM3RERkcSQFHQAERGpPCp9EZEEotIXEUkgKn0RkQSi0hcRSSAqfRGRBKLSFxFJICp9EZEEotIXEUkgKUEHKKlBgwaenp4edAwRkbiyZMmS7909raxxMVf66enp5OTkBB1DRCSumNn6SMbp4x0RkQSi0hcRSSAqfRGRBKLSFxFJICp9EZEEotIXEUkgKn0RkQQSc9/TP1y79u7i/vn3UyOlBtWTqxf/N6V6xNPht1OSUjCzoP8kEZGoqzKl/2PBj4ydPxbnyK/5m2RJh/fEcRjrHOrJp1pyNT35iEhUVZnSP672cey7cx+FRYXs2beH3YW72VMY+m8p04daVup0ifk/FvzI9zu/P+g6hUWFUfm7KvLJp3a12vRq3otqydWiklVEYl+VKX0AMyM1OZXU5FSOqnZUoFn2Fe2rlCefXYW72LJ7C3sK95S6TsG+gkPm/P2vfs+LF71YSVtFRIJWpUo/liQnJVMrqRa1UmsFmqPIiyjYV1DqE8izS5/lkcWPMCRjCN2bdg80p4hUDnM/8s/AoykjI8N1wrXKsaNgBydPPZm0WmlkX5tNclJy0JFE5DCZ2RJ3zyhrnL6ymcBqV6vNuLPGsfSbpTy79Nmg44hIJVDpJ7iB7QbSvWl3Rr87mq27twYdR0QqmEo/wZkZk/tOZvPOzdwz956g44hIBVPpCx1P7Mg1p13DlOw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rSHIFta2OB14NdWcK8JK7zzazwRDoYzKSXEE9Jv8EvGjFF6b6Ari6sraXjsgVEUkgcffxjoiIHD6VvohIAlHpi4gkEJW+iEgCUemLiCQQlb6ISAJR6YuIJBCVvohIAvn/wZVh5zczOAEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks_Min, np.array(SI_scores), 'g-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f199744ac90>]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xuc1mP+x/HXp4NCrVKhE4WRzanaW0mJoqPIYVGyFdk2tOuwjjmLZZHjErI5rHT4tSLHitbit7WaLKGo0WobpYYcfhZRfX5/XN+2e6dpjvfM9z68n4/HPLrv675m5jNf7nnP9/p+r+syd0dERHJPrbgLEBGReCgARERylAJARCRHKQBERHKUAkBEJEcpAEREcpQCQEQkRykARERyVJkBYGaTzGydmb2X1HadmX1iZm9HHwOSXrvCzArM7EMz65vU3i9qKzCzy1P/o4iISEVYWTOBzawH8A3wuLsfGLVdB3zj7rcX69semAJ0BloALwP7RS8vA3oDhcBCYIi7Lyntezdt2tTbtGlTsZ9IRCTHLVq06DN3b1ZWvzpldXD318ysTTm/7yBgqrtvAP5pZgWEMAAocPcVAGY2NepbagC0adOG/Pz8cn5rEREBMLOV5el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2AFYAZ9bU8dJMYBGRHJXRQ0AiIlJ5CgARkRylABARyVEKABGRHKUAEBHJUQoAEZEcpQAQEclRCgARkRz1/127/LfDBXnoAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks_Min, np.array(CH_scores), 'b-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这里可以发现数据标准化跟未标准化之前差别很大，所以在涉及距离度量时最好先对数据进行z-score标准化处理。这样聚类的结果才会准确些，两种评价结果均表示作而分类效果会好些。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
